<%@page import="day10.Address"%>
<%@page import="day10.Emp"%>
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %><!--导入标签-->
<html>
	<head>
	<title>Insert title here</title>
	</head>
	<body>
		<%
		Emp hua = new Emp();
		hua.setEname("花花");
		hua.setAge(18);
		hua.setSalary(1800);
		hua.setInterests(new String[]{"听","说","读","写"});
		
		Address address = new Address();
		address.setCity("长安");
		address.setStreet("无名小道");
		address.setRoom("307");
		hua.setAddress(address);
		
		request.setAttribute("emp", hua);
		%>
		
		姓名:${emp.ename}<br>
		年龄:${requestScope.emp.age}<br>
		薪水:${emp['salary'] }<br>
		爱好:
		<c:forEach items="${emp.interests}" var="e"> <!-- forEach标签遍历 -->
		${e}
		</c:forEach>
		<br>
		街道:${emp.address.street }
	</body>
</html>